-
Notifications
You must be signed in to change notification settings - Fork 74
feat: refactor integration testing setup #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Collaborator
✅ Heimdall Review Status
|
This was
linked to
issues
Nov 3, 2025
8fc0354 to
c2befa7
Compare
niran
reviewed
Nov 20, 2025
haardikk21
commented
Nov 21, 2025
- Add latest_block() method to TestHarness in test-utils that encapsulates the two-step process of getting best_block_number then fetching that block - Refactor test_progress_canonical_blocks_without_flashblocks to use the new method - Refactor FlashblockBuilder::build() to use the new method - Reduces code duplication and improves maintainability across all tests
Replace NodeBuilder::testing_node() with LocalNode::create_test_database() to reduce memory usage in parallel tests. The testing_node() helper hardcodes an 8 TB map size which causes ENOMEM errors when running multiple test processes concurrently with cargo test. This prevents memory exhaustion when running parallel tests while maintaining the same functionality.
…er pattern - Add missing max_pending_blocks_depth parameter (5) to FlashblocksState::new() calls in rpc.rs tests - Add missing max_pending_blocks_depth parameter to init_flashblocks_state in test-utils - Fix builder pattern to use engine_api_launcher() + launch_with() instead of .launch() to match TestHarness::new() signature - Enable 'client' feature for reth-optimism-rpc dependency to fix OpEngineApiClient import error These changes ensure no logic was lost during the rebase and fix compilation errors.
70e71ed to
56ba57b
Compare
Contributor
Author
|
LGTM - thanks a lot! I can't do an approval since I opened this PR cc @danyalprout |
3 tasks
danyalprout
approved these changes
Nov 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces a shared integration test framework in
crates/test-utilsand migrates the existing flashblocks RPC tests to use this new infrastructure. This framework supports tests that need to advance the state of the chain via flashblocks or full blocks to verify behavior.TestHarness: The main orchestration layer that combines node management, Engine API interactions, and account management. It handles block building, chain advancement, and flashblocks submission.LocalNode: An in-process Optimism node wrapper with Base Sepolia configuration, isolated from P2P discovery for parallel testing.EngineApi: A wrapper around the Consensus Layer (CL) Engine API for forkchoice updates and payload submission.TestAccounts: Pre-funded, deterministic accounts (Alice, Bob, Charlie, Deployer) compatible with Anvil defaults.Closes #162 and #164.